ECSSC2024
Monash University
Vertical spread of the points varies with the fitted values indicates the existence of heteroskedasticity.
However, this is an over-interpretation.
The visual pattern is caused by a skewed distribution of the predictor.
autovi PackageThe autovi package provides automated assessment of residual plot with computer vision models.
It estimates visual signal strength (VSS), which is the KL divergence between a residual plot and a reference null residual plot.
rotate_resid()vss()check() and summary_plot()rotate_resid()Null residuals are simulated from the fitted model assuming it is correctly specified.
# A tibble: 489 × 2
.fitted .resid
<dbl> <dbl>
1 632372. -3870.
2 525177. -145487.
3 646753. 5602.
4 624848. 122366.
5 611817. -12470.
6 551051. -45186.
7 504757. -144455.
8 445700. 70620.
9 281912. 26909.
10 453398. -86980.
# ℹ 479 more rows
vss()✔ Predict visual signal strength for 1 image.
# A tibble: 1 × 1
vss
<dbl>
1 6.48
check()
── <AUTO_VI object>
Status:
- Fitted model: lm
- Keras model: (None, 32, 32, 3) + (None, 5) -> (None, 1)
- Output node index: 1
- Result:
- Observed visual signal strength: 6.484 (p-value = 0)
- Null visual signal strength: [100 draws]
- Mean: 1.169
- Quantiles:
╔══════════════════════════════════════════╗
║ 25% 50% 75% 80% 90% 95% 99% ║
║1.037 1.120 1.231 1.247 1.421 1.528 1.993 ║
╚══════════════════════════════════════════╝
- Bootstrapped visual signal strength: [100 draws]
- Mean: 6.28 (p-value = 0)
- Quantiles:
╔══════════════════════════════════════════╗
║ 25% 50% 75% 80% 90% 95% 99% ║
║5.960 6.267 6.614 6.693 6.891 7.112 7.217 ║
╚══════════════════════════════════════════╝
- Likelihood ratio: 0.7064 (boot) / 0 (null) = Extremely large
summary_plot()Breusch–Pagan test \(p\)-value = 0.0457
Ramsey Regression Equation Specification Error test \(p\)-value = 0.742
Breusch–Pagan test \(p\)-value = 0.36
Shapiro-Wilk test \(p\)-value = 9.21e-05
Don’t want to install TensorFlow?
Try our shiny web application: https://autoviweb.patrickli.org
Slides URL: https://ecssc2024.patrickli.org